﻿using System;
using System.Collections.Generic;

namespace ASP.NetAjaxApplication.Models
{
    public  class RuleRepository :IRepository<NodeModel>
    {
        private IEnumerable<NodeModel> _rules;
        #region Implementation of IRepository<NodeModel>

        public IEnumerable<NodeModel> GetAll()
        {
            if (_rules == null)
            {
                _rules = DummyData.CreateRules();
            }

            return _rules;
        }

        public NodeModel Insert(NodeModel value)
        {
            throw new NotImplementedException();
        }

        public bool Update(NodeModel value)
        {
            throw new NotImplementedException();
        }

        public bool Delete(NodeModel value)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}